<include file="public@header"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInUp">
    <div class="row">
        <div class="col-md-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>设置用户等级</h5>
                    <div class="ibox-tools">
                        <a href="{:url('userlevel/index')}" class="btn btn-primary btn-xs">所有级别</a>
                        <a href="#" class="btn btn-primary btn-xs active">添加</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="{$action}" method="post" class="form-horizontal js-ajax-form margin-top-20">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control" required id="input-user_login" name="title" value="<?php echo ($row&&$row['title'])? $row['title'] :'';?>">
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>用户级别</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control" required name="level" value='<?php echo ($row && $row['level'])? $row['level'] : $level;?>' >
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>直推人数</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control" required  value="<?php echo ($row&&$row['invite_num'])? $row['invite_num'] :'';?>" name="invite_num">
                                    </div>
                                </div>

                                 <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>直推中达到上一级人数(1级除外)</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control" required  value="<?php echo ($row&&$row['previous_level_num'])? $row['previous_level_num'] :'';?>" name="previous_level_num">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>团队人数</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control"  value="<?php echo ($row&&$row['group_num'])? $row['group_num'] :'';?>"  required name="group_num" >
                                    </div>
                                </div>
                                 <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>激活奖励比例(级差)</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control" required  name="active_back_rate"  value="<?php echo ($row&&$row['active_back_rate'])? $row['active_back_rate'] :'';?>" >
                                    </div>
                                </div>
                                 <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>盈利手续费奖励比例(级差)</label>
                                    <div class="col-md-8">
                                        <input type="number" class="form-control" required  name="profit_back_rate"  value="<?php echo ($row&&$row['profit_back_rate'])? $row['profit_back_rate'] :'';?>" >
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-md-8">
                                       <input type='hidden'  name='id'  value="<?php echo input('param.id/d');?>"  />
                                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang("SAVE")}</button>
                                        <a class="btn btn-default" href="{:url('AdminTag/index')}">{:lang('BACK')}</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
    </body>
    </html>